package com.atguigu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.List;

@Data
@TableName(value = "articles")
public class Article {
    @TableId(type = IdType.AUTO)
    private Integer articleId;
    private Integer userId;
    private String title;
    private String content;

    private String createdAt;

    @TableField(exist = false)
    private User user;

    @TableField(exist = false)
    private List<Comment> commentList;
}
